package com.seeyon.apps.restext;

import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
import com.seeyon.client.CTPRestClient;

public class RestFlowDemorestsample111  {

//取得指定表单流程当前待办人员信息(Since:V61)
public static void testGetFlowDostaff() {
   CTPRestClient client = ClientResource.getInstance().resouresClent();
   String result = client.get("flow/dostaff/{summaryId}", String.class);
   System.out.println(result);
}

//根据SummaryID或AffairID获取表单数据(Since:V61)
public static void getFormData() { 
   CTPRestClient client = ClientResource.getInstance().resouresClent();
   String result = client.get("form/getformdata/{SummaryID/AffairID}", String.class);
   System.out.println(result);
}

//获取指定协同附件列表(Since:V61)
public static void testAttachments() {//0代表附件,2代表关联文档
   CTPRestClient client = ClientResource.getInstance().resouresClent();
   String result = client.get("coll/attachments/{SummaryID}/{AffairID}/{0|2}", String.class);
   System.out.println(result);
}

//获取人员有权限模板ID列表(Since:V61)
public static void testTemplates() {//1-协同模板；2-表单模板，4-公文模板
   CTPRestClient client = ClientResource.getInstance().resouresClent();
   String result = client.get("template/templateidlist/{loginName}/{1,2,4}", String.class);
   System.out.println(result);
}

public static void main(String args[]){
   testGetFlowDostaff();
   getFormData();
   testAttachments();
   testTemplates();
}
}